from flask import Flask
import config
from exts import db, cors
from flask_migrate import Migrate
from app.user import user_bp

app = Flask(__name__)
app.config.from_object(config)

"""
flask db init

flask db migrate -m "Create user table"

flask db upgrade
"""

db.init_app(app)
cors.init_app(app)

migrate = Migrate(app, db)

app.register_blueprint(user_bp)


if __name__ == '__main__':
    # app.run(debug=True, host='127.0.0.1',port=8000)
    app.run(debug=True, host='127.0.0.1', port=8000)